1. Field of the Invention
The present invention relates to a computer peripheral apparatus having both a central processing unit (hereafter, the xe2x80x9ccentral processing unitxe2x80x9d will be referred to as the xe2x80x9cCPUxe2x80x9d) which is operated on the basis of firmware stored in a nonvolatile memory and an interface which can be connected to a computer. More particularly, the present invention relates to a computer peripheral apparatus in which mutually different interfaces can be mounted, and relates to a computer readable medium having a program for controlling the computer peripheral apparatus.
The present application is based on Japanese Patent Application No. Hei. 11-191635, which is incorporated herein by reference.
2. Description of the Related Art
A scanner, a printer, and the like are known as peripheral apparatuses which can be connected to a computer and have CPUs. In such a peripheral apparatus, firmware for operating the CPU is generally stored in a nonvolatile memory. In addition, in recent years, interfaces for connecting a computer and its peripheral apparatuses have come to be diversified. For example, a scanner can be connected to the computer by a SCSI, a USB, IEEE 1394, and the like.
However, in a conventional peripheral apparatus having an erasable programmable read only memory (EPROM) as a nonvolatile memory, EPROMs storing firmware need to be prepared in a number corresponding to the number of types of interfaces, and different EPROMs need to be mounted for the respective types having different interfaces. Further, in recent years, firmware of the peripheral apparatus has come to be stored in a flash memory which is rewritable in the state of being mounted on a board. In a case where firmware which is different for each interface is stored in the flash memory, it is also necessary to prepare firmware in a number corresponding to the number of types of interfaces, and write the firmware in correspondence with the types of interfaces. For this reason, with conventional peripheral apparatuses, there has been a problem in that the development of firmware for each interface and management of supply thereof become complicated.
The present invention has been devised to overcome the above-described problem, and its object is to provide a computer peripheral apparatus which can be operated by the same firmware even if the interface is different.
According to the first aspect of the present invention, there is provided a computer peripheral apparatus comprising a central processing unit, a plurality of interface units of different types including controllers which control data transfer between a computer and the central processing unit, a plurality of controlling devices, one of which mutually transfers signals between the central processing unit and one of the plurality of interface units, and an identifying device which identifies a type of one of the controllers, and which operates the central processing unit by using one of the plurality of controlling devices that corresponds to the one of the controllers. For example, in a case where firmware including a plurality of modules corresponding to the plurality of controlling devices and a module corresponding to the identifying device is stored in a nonvolatile memory, it is unnecessary to replace the nonvolatile memory in correspondence with the interface unit. In addition, since the computer peripheral apparatus having the same function but having a different interface unit can be operated by the same firmware, the development of firmware and management of supply thereof are facilitated.
According to the second aspect of the present invention, it is preferable that the identifying device writes a value in a predetermined region of memory space of the central processing unit, and identifies the type of one of the controllers by a return value which is obtained by reading data from the predetermined region of the memory space of the central processing unit. Accordingly, the controlling device can be selected in accordance with the type of the interface unit by making use of the fact that the assignment of controllers in the memory space, the numbers of registers, or the attributes of the registers differ in the interface units of different types, so as to operate the central processing unit.
According to the third aspect of the present invention, it is preferable that the controllers of the plurality of interface units are assigned to respective regions in the memory space of the central processing unit which are mutually different. Accordingly, even if the numbers, attributes, and the like of the registers in the interface units of different types are the same, the controlling device can be selected in accordance with the type of the interface unit, so as to operate the central processing unit.
According to the fourth aspect of the present invention, it is preferable that the plurality of interface units have registers in the respective controllers, and wherein numbers of the registers are mutually different. Accordingly, even if the assignments of controllers in the memory space are identical in the interface units of different types, the computer peripheral apparatus is able to select the controlling device in accordance with the type of the interface unit, so as to operate the central processing unit.
According to the fifth aspect of the present invention, it is preferable that the plurality of interface units have registers in the respective controllers, and wherein attributes of the registers are mutually different. Accordingly, even if the assignments of controllers in the memory space are identical in the interface units of different types, and even if the numbers of the registers are identical, the computer peripheral apparatus is able to select the controlling device in accordance with the type of the interface unit, so as to operate the central processing unit.
According to the sixth aspect of the present invention, it is preferable that the plurality of interface units receive different inputs thereto from the central processing unit. Accordingly, even if the numbers and attributes of the registers, assignments of memory space, and the like for the interface units of different types are the same, the controlling device can be selected in accordance with the type of the interface unit, so as to operate the central processing unit.
According to the seventh aspect of the present invention, there is provided a computer readable medium having a program stored thereon for controlling a computer peripheral apparatus which includes a central processing unit and a plurality of interface units of different types including controllers which control data transfer between a computer and the central processing unit. The program comprises the steps of mutually transferring signals between the central processing unit and one of the plurality of interface units, identifying a type of one of the controllers, and operating the central processing unit in accordance with the type of one of the controllers identified in the identifying step. For example, in a case where firmware including a plurality of modules for mutually transferring signals between the central processing unit and one of the plurality of interface units and a module for identifying a type of one of the controllers and operating the central processing unit in accordance with the type of one of the controllers is stored in a nonvolatile memory through a computer readable medium, it is unnecessary to replace the firmware in correspondence with the interface unit. In addition, since the computer peripheral apparatus having the same function but having a different interface unit can be operated by the same firmware, the development of firmware and management of supply thereof are facilitated.
According to the eighth aspect of the present invention, it is preferable that the identifying step comprising writing a value in a predetermined region of memory space of the central processing unit; and identifying the type of one of the controllers by a return value which is obtained by reading data from the predetermined region of the memory space of the central processing unit. Accordingly, the controlling procedure can be selected in accordance with the type of the interface unit by making use of the fact that the assignment of controllers in the memory space, the numbers of registers, or the attributes of the registers differ in the interface units of different types, so as to operate the central processing unit.
According to the ninth aspect of the present invention, the above-described program may be stored in the computer through a communication means, and the program can be written in the computer peripheral apparatus by the computer.
According to the tenth aspect of the present invention, the computer readable medium of the seventh aspect of the present invention may be considered in combination with the computer peripheral apparatus of the first aspect of the present invention. That is, there may be provided a computer readable medium having a program stored thereon for controlling a computer peripheral apparatus which includes a central processing unit, a plurality of interface units of different types including controllers which control data transfer between a computer and the central processing unit, a plurality of controlling devices, and an identifying device, wherein the program causes one of the plurality of controlling devices to mutually transfer a signal between the central processing unit and one of the plurality of interface units, and wherein the program causes the identifying device to identify a type of one of the controllers and operate the central processing unit by using one of the plurality of controlling devices that corresponds to the one of the controllers.
According to the eleventh aspect of the present invention, it is preferable that the program causes the identifying device to write a value in a predetermined region of memory space of the central processing unit and identify the type of one of the controllers by a return value which is obtained by reading data from the predetermined region of the memory space of the central processing unit.
According to the twelfth aspect of the present invention, there is provided a data signal for storing the above-described program in the computer.